import React from 'react';
import { Navigate } from 'react-router-dom';
import Home from '../pages/Home';
import Course from '../pages/Course';
import Teacher from '../pages/Teacher';
import Evaluate from '../pages/Evaluate';
import Login from '../pages/Login';
import PersonalCenter from '../pages/PersonalCenter';
import Setting from '../pages/Setting';
import MyCollect from '../pages/PersonalCenter/MyCollect';
import MyEvaluate from '../pages/PersonalCenter/MyEvaluate';
import MyDraft from '../pages/PersonalCenter/MyDraft';
import EditInfo from '../pages/PersonalCenter/EditInfo';
import MyMessage from '../pages/PersonalCenter/MyMessage';
import MessageDetail from '../component/MessageDetail';
import Attention from '../pages/Home/Attention';
import Recommend from '../pages/Home/Recommend';
import HotList from '../pages/Home/HotList';
import Recent from '../pages/Home/Recent';
import Manager from '../pages/Manager';
import ManagerUser from '../pages/Manager/ManagerUser';
import ManagerEvaluate from '../pages/Manager/ManagerEvaluate';

export default [
    {
        path: '/home',
        element: <Home />,
        children: [
            {
                path: 'attention',
                element: <Attention />,
            },
            {
                path: 'recommend',
                element: <Recommend />,
            },
            {
                path: 'hotList',
                element: <HotList />,
            },
            {
                path: 'recent',
                element: <Recent />,
            },
        ],
    },
    { path: '/course', element: <Course /> },
    { path: '/teacher', element: <Teacher /> },
    { path: '/evaluate', element: <Evaluate /> },
    { path: '/login', element: <Login /> },
    {
        path: '/personalCenter',
        element: <PersonalCenter />,
        children: [
            {
                path: 'myEvaluate',
                element: <MyEvaluate />,
            },
            {
                path: 'myCollect',
                element: <MyCollect />,
            },
            {
                path: 'myDraft',
                element: <MyDraft />,
            },
            {
                path: 'editInfo',
                element: <EditInfo />,
            },
            {
                path: 'myMessage',
                element: <MyMessage />,
            },
            {
                path: 'myMessage/messageDetail',
                element: <MessageDetail />,
            },
        ],
    },
    { path: '/setting', element: <Setting /> },
    {
        path: '/manager',
        element: <Manager />,
        children: [
            { path: 'user', element: <ManagerUser /> },
            { path: 'evaluate', element: <ManagerEvaluate /> },
        ],
    },
    { path: '*', element: <Navigate to="/home/attention" /> },
];
